Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-picks for the 3.x branch (future 3.4) - 15th batch #51574

Merged
merged 27 commits into from
Aug 12, 2021

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Aug 12, 2021

Opening as draft as I got things crashing locally at weird location (when setting icon in X11). I suspect a miscompilation issue, which is worrying, but likely not related to these cherrypicks.

Edit: Yep, no problem after a rebuild. I've already seen this in the past quite infrequently so that's nothing new.

jasonwinterpixel and others added 25 commits August 12, 2021 16:37
…s Exit events.

This is incorrect and not fully implemented, and results in inconsistency in the UI and in the hovering variable.

(cherry-picked from commit edcbe88)
It's raised for us on many comparators implemented to be able to store a struct
in `Set` or `Map` (who rely on `operator<` internally). In the cases I reviewed
we don't actually care about the ordering and we use the struct's function
pointers as that's the only distinctive data available.

(cherry picked from commit 802810c)
Emscripten is LLVM-based so we want to follow the same logic. But we can't just
put it as a match in `methods.using_clang()` as that would mess with the
compiler version detection logic used to restrict old GCC and Clang releases.

(cherry picked from commit 3442168)
Add a missing call to disable warnings on a forked env for freetype's
`sfnt.c`.

(cherry picked from commit c44ebb0)
Adds factor data for vertical mousewheel event, in line with horizontal mousewheel event

(cherry picked from commit 63ba15a)
This works in a way similar to tabs in KDE or some patched
Chromium builds.

(cherry picked from commit d2dec8d)
Change incorrect `[/code]` closing tags to `[/url]` tags.

The `url` tags for the links to the Unicode code points information use `[/code]` rather than `[/url]` to close them.

This results in the links being rendered incorrectly in the IDE--the entire rest of the documentation for each method gets turned into a giant underlined link.

This issue was introduced in godotengine@a2271ba.

(cherry picked from commit b85688a)
This restores Windows platform file handling back to open files non-exlusively by default, as was the case before October 2018. (See godotengine@b902a2f)
Back then, while fixing warnings for MSVC, the function used for opening files was changed from _wfopen() to _wfopen_s() as suggsted by the warning C4996. ("This function may be unsafe, consider using _wfopen_s instead.")

This new function
1. did parameter validation and thus avoided some possible security issues due to nil pointers or wrongly terminated strings
2. it also changed the default file sharing for opened files from _SH_DENYNO (which was the implicit default for the previous _wfopen()) to _SH_SECURE.

_SH_DENYNO means every opened file could be opened by other calls (like is the default on other operating systems).
_SH_SECURE means if the file is opened with READ access, others can still read the same file, but if it is opened with WRITE access, others can't open it at all, not even to read.

This led to rarely occuring bugs on Windows, i.e. due to random access by Antivirus processes, or Godot/Windows not closing a file handle fast enough while trying to open it again elsewhere (i.e. project.godot, instead showing the Project manager, or saving shaders/debugging the game).

What this PR does it change the file access to a third method, _wfsopen(). This is still secure, doing parameter validation and thus avoids the warning, but it allows us to actually SET the file sharing parameter. And we set it to _SH_DENYNO, as it was implicitely before the change. (And as it currently is on all non-Windows platforms, where file sharing restrictions don't exist by default.)

Warning C4996 should really have been pointing this out. It should've been _wfsopen() all along. Let's hope this banishes those annoying, rare errors for all eternity.

Fixes godotengine#28036.

(cherry picked from commit b48cbb5)
Updated to latest upstream changes (2021-07-05 21:36:52 GMT), taken from bagder/ca-bundle@8b263a1

(cherry picked from commit d900591)
Previously, you would be able to double click a word, followed by
single-clicking another word on the same line, which would select the
entire line. Now, it will only select the whole line if the mouse
position has remained the same after the double click. This mimicks the
behavior in most third party text editors.

Fixes godotengine#51312.

(cherry picked from commit 408401a)
And another piece of dead code found while searching for "use_builtin".

(cherry picked from commit 6e94391)
(cherry picked from commit e3872a2)
@akien-mga akien-mga added this to the 3.4 milestone Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.